<HTML>
<HEAD>
<TITLE ID='L_ErrDlg_DialogTitle'>An Error Occurred!</TITLE>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=windows-1252'>
<LINK REL='stylesheet' TYPE='text/css' HREF='/widgets/bizdesk.css' ID='mainstylesheet'>

<SCRIPT LANGUAGE='VBScript'>

'Dim m_strHelpTopic         ' Help Topic URL
Dim winHelpWindow          ' Window name used to display help

Sub initDialog()
  ' Get the dialog arguments, and populate the dialog.

  'Dim btnHelp
  Dim dictArgs
  Set dictArgs = window.dialogArguments

  divErrorMsg.innerHTML = dictArgs.Item("error")
  divDetails.innerHTML = Replace(Replace(Replace(dictArgs.Item("details"), "&", "&amp;"), "<", "&lt;"), ">", "&gt;")
  ' ERROR DIALOG SHOULD NOT HAVE HELP BUTTON
  'm_strHelpTopic = dictArgs.Item("HelpTopic")
  'If IsNull(m_strHelpTopic) Then
    ' Hide the help button
    'Set btnhelp = L_Help_Button
    'btnHelp.style.display = "none"
  'End If

  Call resizeDialog()
End Sub


Sub resizeDialog()
  window.dialogHeight = CStr(document.body.scrollHeight + 42) & "px"
End Sub


Sub toggleDetails()
  If divDetails.style.display = "none" then
    divDetails.style.display = ""
  Else
    divDetails.style.display = "none"
  End If

  Call resizeDialog()
End Sub

'Sub onHelp()
'  If Not IsNull(m_strHelpTopic) Then
'		If typename(winHelpWindow) = "HTMLWindow2" Then winHelpWindow.close
'		Set winHelpWindow = window.open(m_strHelpTopic, "winHelpWindow", _
' 					 "height=500,width=700,status=no,toolbar=yes,menubar:no,resizable=yes")
'   End If
'End Sub

Sub onClose()
  Call window.close()
End Sub

</SCRIPT>

</HEAD>
<BODY onload='initDialog' STYLE="margin:0px;padding:0px;overflow:hidden">

  <DIV STYLE='margin:16px'>
    <DIV ID='divErrorMsg' STYLE='margin:16px'>
    </DIV>

    <DIV ALIGN='right'>
      <BUTTON ID='L_Close_Button' onclick='onClose()'>Close</BUTTON>
      <SPAN STYLE='width:2px; margin:0px; padding:0px'></SPAN>
      <BUTTON ID='L_Details_Button' onclick='toggleDetails()'>Details</BUTTON>
    </DIV>

    <DIV ID='divDetails' STYLE='margin:16px;padding:4px;border:2px inset;display:none'>
    </DIV>
  </DIV>

</BODY>
</HTML>
